import { fetchUserAge, userAge, consoleInfo } from "./user";

// 直接input
function add(a: number, b: number): number {
  return a + b;
}

// 间接输入
export function doubleUserAge(): number {
  consoleInfo();
  return userAge() * 2;
}

export async function doubleFetchUserAge(): Promise<number> {
  const userAge = await fetchUserAge();

  return userAge * 2;
}
